<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>{:$page_info['title']}</title>
<link rel="icon" href="favicon.ico" type="image/ico">
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="author" content="yinqi">
<link href="__STATIC__/admin/css/bootstrap.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/materialdesignicons.min.css" rel="stylesheet">
<link href="__STATIC__/admin/css/style.min.css" rel="stylesheet">

<link href="__STATIC__/common/select2/select2.css" rel="stylesheet">
<link href="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css" rel="stylesheet">

<link href="__STATIC__/admin/css/cch.css" rel="stylesheet">
</head>
  
<body>
<div class="container-fluid p-t-15">
    <div class="input-group col-lg-2">
        <span class="input-group-btn"><button class="btn btn-default" type="button">日期</button></span>
        <select class="form-control" id="model_date_sel">
            <?php foreach ($model_dates as $param_k => $param_v): ?>
                <option value="{:$param_v['key']}" {:$param_v['key']==session('bill_model_date')?'selected':''}>{:$param_v['name']}</option>
            <?php endforeach ?>
        </select>
    </div>
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-toolbar clearfix">
          <form class="pull-right search-bar" method="get" action="{:url($page_info['action'])}" role="form">
            {include file="html/search" /}
            <input type="hidden" name="num" value="0" />
          </form>
          <div class="toolbar-btn-action">
            <a class="btn btn-success m-r-5 search_btn" href="javascript:void(0)"><i class="mdi mdi-magnify"></i> 搜索</a>
          </div>
        </div>
        <div class="card-body">
          
          <div class="table-responsive">
            <table class="table table-bordered">
              <thead>
                <tr>
                    <th colspan="100">下载列表（点击分别下载）</th>
                </tr>
              </thead>
              <tbody>

                    <tr>
                    <?php for ($i=1; $i <= $nums; $i++): ?>
                    
                        <td><a class="export_btns" href="javascript:void(0);" title="下载">{:$i}</a></td>
                    
                    <?php endfor ?>
                    </tr>
              </tbody>
            </table>
          </div>


 
        </div>
      </div>
    </div>
    
  </div>
  
</div>

<script type="text/javascript" src="__STATIC__/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__STATIC__/admin/js/main.min.js"></script>

<!-- 时间选择器 -->
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="__STATIC__/admin/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>

<script src="__STATIC__/common/select2/select2.min.js"></script><!-- 下拉搜索 -->

<script type="text/javascript" src="__STATIC__/admin/js/lyear-loading.js"></script><!-- loading -->
<script type="text/javascript" src="__STATIC__/admin/js/cch.js"></script>
<script type="text/javascript">
    var cch_loading = null;
    // 导出按钮
    $('.export_btns').on('click',function(){
        $('input[name="num"]').val($(this).html());
        var action = $(this).attr('data-action');
        if (action == null || action == '') {
            action = 'export';
        }
        $('form').attr('action',action);
        $('form').submit();
        setTimeout(function(){
            $(this).parents().prev('form').attr('action','index');
        },1000);

        cch_loading = $('body').lyearloading({
            opacity: 0.5,
            spinnerSize: 'lg',
            spinnerText: '导出中...请再下载文件后，再关闭或刷新页面<br /><br /><button class="btn btn-danger btn-sm" onclick="closeLoading()">关闭</button>',
            textColorClass: 'text-info',
            spinnerColorClass: 'text-info'
        });
    });

    function closeLoading(){
        cch_loading.hide();
        cch_loading = null;
    }
</script>
</body>
</html>